package itsm.isperp.framework.web.context.request.async;

import java.util.concurrent.Callable;

import org.springframework.web.context.request.NativeWebRequest;
import org.springframework.web.context.request.async.CallableProcessingInterceptorAdapter;

/**
 * 
 * 
 * 
 * @author lizx
 * @date 2015-2-16
 * @since 1.0
 * 
 */
public class TimeoutCallableProcessingInterceptor extends
		CallableProcessingInterceptorAdapter {

	@Override
	public <T> Object handleTimeout(NativeWebRequest request, Callable<T> task)
			throws Exception {
		throw new IllegalStateException("[" + task.getClass().getName()
				+ "] timed out");
	}
}
